//
//  NetworkEngine.h
//  Project
//
//  Created by Jason on 15/12/2.
//  Copyright © 2015年 Happy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>

typedef void(^RequestSucBlock)(id object);

typedef void(^RequestSucWithMsgBlock)(id object ,NSString *msg);

typedef void(^RequestFailWithBlock)(NSError *error,NSString *msg);

@interface NetworkEngine : NSObject
+(NetworkEngine *)engine;
+(AFHTTPRequestOperationManager *)manager;
-(AFHTTPRequestOperation*)doPOSTFetchRequest:(NSString *)urlStr withParmeter:(NSDictionary *)parmeter withRemarkDic:(NSDictionary*)remarkDic withSucBlock:(RequestSucBlock)sucblock withSucWithMsgBlock:(RequestSucWithMsgBlock)sucMsgBlock withFailBlock:(RequestFailWithBlock)failBlock;

-(AFHTTPRequestOperation *)doUploadFileRequest:(NSString *)urlStr withParmeter:(NSDictionary *)parmeter withRemarkDic:(NSDictionary*)remarkDic withSucBlock:(RequestSucBlock)sucblock withSucWithMsgBlock:(RequestSucWithMsgBlock)sucMsgBlock withFailBlock:(RequestFailWithBlock)failBlock;

@end
